<?php include 'includes/header.php';?>
       <!--Start bar-->
      	<div class="bar">
      	<div class="bartextContent">
      	
      	<table width="947" border="0" cellspacing="o" cellpadding="o">
  		<tr>
    	<td width="130" valign="top"><!--  <strong>Smart Search --></strong></td>
    	<td width="221" valign="top"><!--  <input type="text" name="textfield" id="textfield" /> &nbsp;Go--></td>
   		<td width="596" align="right" valign="top"><a href="{url}/login">Log in</a> |<a href="{url}/signup"> Sign Up </a>|<a href="{url}/myaccount"> My Account </a></td>
  		</tr>
		</table>
     	</div>
     	</div>
<!--Start MainContent Wrapper-->
<div class="maincontentWrapper">

<?php include 'includes/sidenav.php';?>
<?php include 'includes/categorynav.php';?>
  <!--Start ProductContainer-->
  	   <?php if (isset($deals)): ?>
       <div class="miniMasthead"><img src="/assets/mcchampdeals/images/masthead.png" /></div>
      <?php endif;?>
        <div class="productContainer">
        <div id="productContent">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			 <?php if (isset($deals)): ?>
                    <?php foreach($deals as $deal){ ?>
		               <tr>
						<td width="38%" valign="top">
						<img src="/assets/mcchampdeals/images/item.jpg" width="242" height="210" class="img" /></td>
						<td width="62%" height="248" valign="top">
						<div id="productPrice">
							<p>Item Code:<?=$deal->code;?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 			<?=$deal->name;?></p></div>
							
							<div id="Price">
							<p>Price : Php <?=$deal->price;?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    Save:   <?=$deal->discount;?>%</p>
						   
						   <p class="productinfo"><?=$deal->description;?>
						   <br><br>
						   <table width="100%">
						   <tr>
						   	   <td>
								   <a href="<?=DEALURL?>/view/<?=$deal->id;?>" >
								    <img src="/assets/mcchampdeals/images/buy.jpg" >
								   </a>
							   </td>
							   <td>
							   <?php if(isset($deal->ishotdeal) && $deal->ishotdeal == 1):?>
							   			<blink><b>This is HOT DEAL</b></blink>
							   <?php endif;?>
							   </td>
						    </tr>
						  </table>
						   </p>
						   
						   
						  
						   <p id="productOffer">
						   Remaining  Items:  <?=$deal->quantity;?> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Offers Ends at:    	<?=$deal->deal_end_date;?></p>
						   
						</div>
						</td>
					   <td width="0%"></td>
					   </tr>
                    <?php }?>
			<?php endif; ?> 
			
			
			<?php if (isset($individualdeal)): ?>
		              <tr>
		              
		              
						<td width="100%" height="800" valign="top">
						
						<form action="<?=DEALURL?>/pay/<?=$individualdeal->id;?>" method="post">
						
						<div id="productPrice" style="width: 98%">
							<p>Item Code:<?=$individualdeal->code;?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 			<?=$individualdeal->name;?></p></div>
							
							<div id="Price" style="width: 98%">
								<p>Price : Php <?=$individualdeal->price;?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    Save:   <?=$individualdeal->discount;?>%</p>
							   
							   <p class="productinfo" style="width: 98%"><?=$individualdeal->description;?>
							   <br><br>
							   <table width="100%">
							   <tr>
							   	   <td>
								   </td>
								   <td>
								   <?php if(isset($individualdeal->ishotdeal) && $individualdeal->ishotdeal == 1):?>
								   			<blink><b>This is HOT DEAL</b></blink>
								   <?php endif;?>
								   </td>
							    </tr>
							  </table>
							   </p>
							   <p id="productOffer" style="width: 97%">
							   Remaining  Items:  <?=$individualdeal->quantity;?> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Offers Ends at:    	<?=$individualdeal->deal_end_date;?></p>
							   <br>
							   Merchant Details
							   <p>
							   <table>
							   		<tr>
							   			<td style="color: #4D4D4D; font:normal 15px arial">
							   			<?php if(isset($tenant)):?>
								   			Name : <?=$tenant->name?><br>
								   			Description: <?=$tenant->description?><br>
								   			Address: <?=$tenant->address?><br>
							   			<?php endif;?>
							   			</td>
							   		</tr>
							   </table>
							   <br><br>
							   <table style="color: #4D4D4D; font:normal 15px arial; width:90%">
								   	<tr>
								   		<td colspan="2"><input type="checkbox" name="sendasgift"> Send as a Gift</td>
								   	</tr>
								   	<tr>
								   		<td >Receipient FullName</td><td><input type="text" name="receipientfullname"></td>
								   	</tr>
								   	<tr>
								   		<td >Email Address</td><td><input type="text" name="receipientfullname"></td>
								   	</tr>
								   	<tr>
								   		<td valign="top">Address</td><td><textarea name="address" cols="40" rows="3"></textarea></td>
								   	</tr>
								   
								   	<tr>
								   		<td valign="top">Notes</td><td><textarea name="notes" cols="40" rows="3"></textarea></td>
								   	</tr>
							   </table>
							   <br><br>
							   <table style="color: #4D4D4D; font:normal 15px arial; width:100%">
								   	<tr>
								   		<td style="font:strong">Select Mode of Payment</td>
								   	</tr>
							   		<tr>
							   			<td><input type="radio" name="modeofpayment" value="onlinepayment">Pay Through Credit Card</td>
							   			<td><input type="radio" name="modeofpayment" value="ipai">Bank Transfer</td>
							   			<td><input type="radio" name="modeofpayment" value="westernunion">Pay Through Western Union</td>
							   		</tr>
							   		<tr>
							   			
							   			<td colspan="3" align="right"><input type="submit" value="Confirm"/></td>
							   		</tr>
							   </table>
							   </p>
							</div>
							
							</form>
						</td>
					   <td width="0%"></td>
					   </tr>
			<?php endif; ?> 

			  </table>
		</div>
        <!--end of ProductContainer-->
       </div>
      <!--End of Main content Wrapper-->
      </div>
<!--end of rightpane-->
<div></div>
<?php include 'includes/footer.php'; ?>